package com.xj.homework.pattern.factory.simpleFactory;

public class PhoneFactory {

    public Phone createPhone(String type) {
        if (type.equals("三星")) {
            return new SunSongPhone();
        } else if (type.equals("apple")) {
            return new ApplePhone();
        }
        return null;
    }

}
